// 这里放面试题相关的请求

import request from '@/utils/request'

// 获取面试题
export const articleListAPI = ({ current, sorter }) => {
  return request.get('/h5/interview/query', {
    params: {
      current: current,
      pageSize: 10,
      sorter: sorter
    }
  })
}

// 获取某个面试题的详细信息
export const getArticleDetail = (id) => {
  return request.get('/h5/interview/show', { params: { id: id } })
}

// 点赞 取消点赞 收藏 取消收藏
export const updateLikeAndCollect = (data) => {
  return request.post('/h5/interview/opt', data)
}

// 获取点赞(喜欢)的面经列表 获取收藏的面经列表
export const collectAndLikeListAPI = (params) => {
  return request.get('/h5/interview/opt/list', { params: params })
}
